<?php
$tableProduct = "product";

$nowmonth=number_format(date("m"));


$query = mysql_query("select count(product_id) from $tableProduct  where month >= '$nowmonth' ");
$sum = mysql_result($query, 0);



$sql="select * from  $tableProduct where month >= '$nowmonth' order by month,week,at";

$result = mysql_query($sql);

while ($row = mysql_fetch_array($result)) {
    $product_names[] = $row['product_name'];
    $product_price[] = $row['price'];
    $product_week[] = $row['week'];
    $product_at[] = $row['at'];
    $product_ids[] = $row['product_id'];
    $product_month[] = $row['month'];
    $product_status[] = $row['status'];
}


?>